package com.kimehwa.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import org.apache.ibatis.javassist.SerialVersionUID;

import java.time.LocalDateTime;

/**
 * @author xiaodongguan
 * @description
 * @since 2021-08-11 22:15
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")
@EqualsAndHashCode(callSuper = false)
public class User extends Model<User> {

    public static final long SerialVersionUID = 1L;

    // 主键
    /**
     * 默认是雪花算法。
     */
    @TableId
    private Long id;
    @TableField("name")
    private String name;
    private Integer age;
    private String email;
    // 直属上级
    private Long managerId;

    // 创建时间
    private LocalDateTime createTime;

    @TableField(exist = false)
    private String remark;

}
